package com.lry.basic.algorithm.flow.windows;

public class Test {
    public static void main(String[] args) throws InterruptedException {
        //1s分成5格，1s限制2个请求
        SlidingTimeWindows slidingTimeWindows = new SlidingTimeWindows(5,2);

        for(int i=0;i<10;i++){
            System.out.println(slidingTimeWindows.checkAndAdd());
            Thread.sleep(200);
        }

    }
}
